<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>四则计算器</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<input type="number" name="x" id="x">
<select name="method" size="1" id="method">
    <option value="add">+</option>
    <option value="sub">-</option>
    <option value="mul">*</option>
    <option value="div">/</option>
</select>
<input type="number" name="y" id="y">=
<input type="text" id="result">
<br>
<button id="cacul">计算</button>
</body>
<script>
    $(function () {
        $("#cacul").click(function () {
            let a=$("#x").val();
            let m=$("#method").val();
            let b=$("#y").val();
            $.post("/jsq",
                {"x":a,"method":m,"y":b},
                function (data){$("#result").val(data)}
            )
        })
    })
</script>
</html>